package com.atguigu.gulimall.product.vo.webvo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {
    //获取sku基本信息：pms_sku_info
    private SkuInfoEntity info;
    //获取sku 图片信息pms_sku_images
    private List<SkuImagesEntity> images;
    //获取sku型号
    List<SkuAttrValueVo> saleAttr;

    //spu介绍信息pms_spu_info_desc
     private SpuInfoDescEntity desc;
    //spu规格包装pms_product_attr_value
      List<SpuItemAttrGroupVo> attrGroupVos;

      @Data
      public  static  class  SkuAttrValueVo{
          private  Long attrId;
          private  String attrName;
          private  List<SkuAttrIdsVo> skuAttrIdsVos;
      }

    @Data
    public  static  class  SkuAttrIdsVo{
        private String attrValue;
        private String skuIds;
    }
      //spu规格包装pms_product_attr_value
    @Data
    public static class SpuItemAttrGroupVo {
        private  String groupName;
        private List<SpuBaseAttrVo> attrVos;
    }
    @Data
    public static class SpuBaseAttrVo {
        private  String attrName;
        private  String attrValue;
    }
}
